<template>
	<div class="layout layout-100">
		<Layout class="layout-100 modal">
			<Header class="header-cont">{{this.$route.params.name}}</Header>
			<Content class="content-cont  modal-content">
				<Tabs value="0" @on-click="">
					<TabPane v-for="(item,index) in detailData" :key="item.reginName" :label="item.reginName" :name="index+''">
						<Table border :columns="columns" :data="item.list"></Table>
					</TabPane>
				</Tabs>
			</Content>
		</Layout>
	</div>
</template>

<script>
	import {
		mapMutations
	} from 'vuex'
	export default {
		name: "dynamic-supervision-report-detail",
		data() {
			return {
				detailData: '',
				columns: [
					{
						title:'序号',
						type: 'index', //序号
						align: 'center',
						width: '70'
					},
					{
						title: '公司名称',
						key: 'orgName',
						align: 'center'
					},
					{
						title: '项目名称',
						key: 'proName',
						align: 'center'
					},
					{
						title: '高风险施工内容',
						key: 'content',
						align: 'center'
					},
					{
						title: '相关业务部门',
						key: 'relatedDept',
						align: 'center'
					}
				],
			}
		},
		methods: {
			getRiskOrderDestroydetail() { //信息详情
				this.$api.ledgerQuery.getReportDetail(this.$route.params.id).then(res => {
					if (res.code === 200) {
						this.detailData = res.data;
					} else {
						this.$Message.warning(res.message)
					}
				})
			},
		},
		mounted() {
			this.getRiskOrderDestroydetail();
		}
	};
</script>

<style scoped>
	.width50 {
		width: 40%;
	}
</style>
